// vite.index.js
import { defineConfig } from "file:///Users/idea/work/tampermonkey-plugins/square-lake-ui/plugins/json-input/node_modules/vite/dist/node/index.js";
import vue from "file:///Users/idea/work/tampermonkey-plugins/square-lake-ui/plugins/json-input/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { viteSingleFile } from "file:///Users/idea/work/tampermonkey-plugins/square-lake-ui/plugins/json-input/node_modules/vite-plugin-singlefile/dist/esm/index.js";
import VueDevTools from "file:///Users/idea/work/tampermonkey-plugins/square-lake-ui/plugins/json-input/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
import { resolve } from "path";

// src/request/env.js
var env_default = {
  activeProfile: "local",
  local: {
    host: "http://127.0.0.1:8081",
    prefixPath: "/kapi",
    originFlag: true,
    rewritePrefix: false
  },
  prod: {
    host: "http://his-gyfy.cfuture.shop",
    prefixPath: "/kapi",
    originFlag: true,
    rewritePrefix: true
  }
};

// vite.index.js
var __vite_injected_original_dirname = "/Users/idea/work/tampermonkey-plugins/square-lake-ui/plugins/json-input";
var vite_config_default = defineConfig({
  base: "./",
  plugins: [
    VueDevTools(),
    vue(),
    viteSingleFile()
  ],
  resolve: {
    alias: [
      {
        find: "@",
        //指向的是src目录
        replacement: resolve(__vite_injected_original_dirname, "src")
      }
    ]
  },
  server: {
    //主要是加上这段代码
    host: "127.0.0.1",
    port: 3e3,
    proxy: {
      "/kapi": {
        target: env_default[env_default.activeProfile].host,
        //实际请求地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/kapi/, env_default[env_default.activeProfile].rewritePrefix ? "/kapi" : "")
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiLCAic3JjL3JlcXVlc3QvZW52LmpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiL1VzZ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